Optimal. Leaf size=43 \[ \frac {(A-B) \tan (c+d x)}{d (a \sec (c+d x)+a)}+\frac {B \tanh ^{-1}(\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3998, 3770, 3794} \[ \frac {(A-B) \tan (c+d x)}{d (a \sec (c+d x)+a)}+\frac {B \tanh ^{-1}(\sin (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3794
Rule 3998
Rubi steps
\begin {align*} \int \frac {\sec (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx &=(A-B) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx+\frac {B \int \sec (c+d x) \, dx}{a}\\ &=\frac {B \tanh ^{-1}(\sin (c+d x))}{a d}+\frac {(A-B) \tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.27, size = 109, normalized size = 2.53 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left ((A-B) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+B \cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 74, normalized size = 1.72 \[ \frac {{\left (B \cos \left (d x + c\right ) + B\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (B \cos \left (d x + c\right ) + B\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A - B\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 70, normalized size = 1.63 \[ \frac {\frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} + \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.68, size = 78, normalized size = 1.81 \[ \frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) B}{a d}-\frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) B}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.35, size = 99, normalized size = 2.30 \[ \frac {B {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {A \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.93, size = 41, normalized size = 0.95 \[ \frac {2\,B\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________